package com.smasher.widget.selection;


/**
 * @author HXZ_Android
 */
public class TimeSelectBuilder {

    private static final String TAG = "TimeSelect";

    private boolean showYear = true;
    private boolean showMonth = true;
    private boolean showDay = true;
    private boolean showHour;
    private boolean showMinute;
    private boolean showSecond;

    private int startYear;
    private int startMonth;
    private int startDay;

    private int endYear;
    private int endMonth;
    private int endDay;

    private OnTimeListener onTimeListener;

    public TimeSelectBuilder() {

    }


    public boolean isShowYear() {
        return showYear;
    }

    public boolean isShowMonth() {
        return showMonth;
    }

    public boolean isShowDay() {
        return showDay;
    }

    public boolean isShowHour() {
        return showHour;
    }

    public boolean isShowMinute() {
        return showMinute;
    }

    public boolean isShowSecond() {
        return showSecond;
    }

    public int getStartYear() {
        return startYear;
    }

    public int getStartMonth() {
        return startMonth;
    }

    public int getStartDay() {
        return startDay;
    }

    public int getEndYear() {
        return endYear;
    }

    public int getEndMonth() {
        return endMonth;
    }

    public int getEndDay() {
        return endDay;
    }

    public OnTimeListener getOnTimeListener() {
        return onTimeListener;
    }

    public TimeSelectBuilder showYear(boolean show) {
        showYear = show;
        return this;
    }

    public TimeSelectBuilder showMonth(boolean show) {
        showMonth = show;
        return this;
    }

    public TimeSelectBuilder showDay(boolean show) {
        showDay = show;
        return this;
    }

    public TimeSelectBuilder showHour(boolean show) {
        showHour = show;
        return this;
    }

    public TimeSelectBuilder showMinute(boolean show) {
        showMinute = show;
        return this;
    }

    public TimeSelectBuilder showSecond(boolean show) {
        showSecond = show;
        return this;
    }

    public TimeSelectBuilder setStartRange(int year, int month, int day) {
        startYear = year;
        startMonth = month;
        startDay = day;
        return this;
    }

    public TimeSelectBuilder setEndRange(int year, int month, int day) {
        endYear = year;
        endMonth = month;
        endDay = day;
        return this;
    }


    public TimeSelectBuilder setOnTimeListener(OnTimeListener listener) {
        onTimeListener = listener;
        return this;
    }

    public TimeSelection Build() {
        return new TimeSelection(this);
    }

}
